package com.lizhi.note.service;


import com.lizhi.note.dto.AppUserDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface AppUserService {

    AppUserDTO createUser(AppUserDTO userDto);

    Optional<AppUserDTO> getUserById(Long id);

    Optional<AppUserDTO> getUserByUsername(String username);

    Page<AppUserDTO> getAllUsers(Pageable pageable);
    List<AppUserDTO> getAllUsers();
    AppUserDTO updateUser(Long id, AppUserDTO userDto);

    void deleteUser(Long id);

    boolean existsByUsername(String username);

    boolean existsByPhone(String phone);

    void updatePassword(Long id, String oldPassword, String newPassword);
}
